package service;

import org.apache.ibatis.annotations.Param;
import pojo.*;

import java.util.List;

/**
 * Created by Dell on 2019/1/15.
 */
public interface AppService {
    public List<AppInfos> selectAppInfo(@Param("pageNo") int pageNo
            , @Param("pageNum") int pageNum
            , @Param("pintai") int pintai
            , @Param("states") int states
            , @Param("softwareName") String softwareName
            , @Param("categoryLevel1") int categoryLevel1
            , @Param("categoryLevel2") int categoryLevel2
            , @Param("categoryLevel3") int categoryLevel3
            , @Param("devId") int id);

    public int selectAppCount(
            @Param("pintai") int pintai
            , @Param("states") int states
            , @Param("softwareName") String softwareName
            , @Param("categoryLevel1") int categoryLevel1
            , @Param("categoryLevel2") int categoryLevel2
            , @Param("categoryLevel3") int categoryLevel3
            , @Param("devId") int id);


    public List<AppCategory> selectCategory(@Param("parentId")int parentId);

    public int updateAppStates(@Param("status")int status,@Param("id")int id);

    public List<AppVersion> selectAppVersion(@Param("appid")int appid);

    public AppState selectLook(@Param("appid")int appid);

    public int insertApp(AppInfoss info);

    public int delApp(@Param("id")int id);

    public AppsState selectLooks(@Param("appid")int appid);

    public int updateAppInfo(CopyInfo copyInfo);

    public AppVersion selectVersion(@Param("appid") int appid);

    public int updateVersion(AppVersion appVersion);

    public String maxModify(@Param("appId")int appId);

    public int insertVersions(AppVersion appVersion);

    public List<AppInfos> adminSelectAppInfo(
            @Param("pageNo")int pageNo
            ,@Param("pageNum")int pageNum,
            @Param("pintai")int pintai
            ,@Param("states")int states
            ,@Param("softwareName")String softwareName
            ,@Param("categoryLevel1")int categoryLevel1
            ,@Param("categoryLevel2")int categoryLevel2
            ,@Param("categoryLevel3")int categoryLevel3);

    public int adminSelectAppInfoCount(
            @Param("pintai")int pintai
            ,@Param("states")int states
            ,@Param("softwareName")String softwareName
            ,@Param("categoryLevel1")int categoryLevel1
            ,@Param("categoryLevel2")int categoryLevel2
            ,@Param("categoryLevel3")int categoryLevel3);

    public int selectMaxVersionId();

    public int updateAppInfoVersion(@Param("versionid") int versionid,@Param("id") int id);

    public int newVersion(int appid);

    public int updateVersionState(@Param("status") int status,@Param("id")int id);
}
